from typing import Optional
from pydantic import BaseModel
from src.enum.result import ResultDataTypeEnum

class ResultDataBase(BaseModel):
    data_type: ResultDataTypeEnum
    type_version: str
    is_over: int

class CrawlerResult(BaseModel):
    crawler_type: int
    crawler_params: Optional[dict] = None
    crawler_status: int
    reason: Optional[str] = None
    exec_time: Optional[str] = None
    exec_result: Optional[int] = None
    result_data: Optional[dict] = None

class CrawlerId(BaseModel):
    crawler_id: str

